#include"ros/ros.h"
#include"turtlesim/Spawn.h"

int main(int argc, char  *argv[])
{
    setlocale(LC_ALL,"");
    ros::init(argc,argv,"mekeo");
    ros::NodeHandle nh;
    ros::ServiceClient client=nh.serviceClient<turtlesim::Spawn>("/spawn");
    turtlesim::Spawn spawn;
    spawn.request.name="xiaohu";
    spawn.request.theta=1;
    spawn.request.x=34;
    spawn.request.y=34;
    client.waitForExistence();
    bool flag=client.call(spawn);
    if(flag)
    {
        ROS_INFO("请求正常");
    }   
    return 0;
}
